package com.kitchen.ui.deco
{
	import flash.events.Event;
	import flash.geom.Rectangle;

	public class WallContainer extends DecoContainer
	{
		
		public function WallContainer(w:int, h:int)
		{
			super(w, h);
			this.pid = 2;
			this.prange = new Rectangle(0, 0, w, h);
			this.bg = new BackGround(779, 272);
			this.addChild(this.bg);
		}
		
		override public function append(deco:Object):void{
			if(this.pid == deco.nPosit){
				var decorate:DecoItem = new DecoItem(deco, this.prange);
				this.decos.push(decorate);
				this.addChild(decorate);
			}else if(deco.nPosit == 1){
				this.bg.setBgImage(deco);
			}
		}
	}
}